package foo.base;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

public class BaseJdbcDAO {
	protected Logger logger = Logger.getLogger(getClass());
	@Autowired
	protected JdbcTemplate jdbcTemplate;

	protected synchronized Integer getSn() {
		String sql = "SELECT sn.nextval FROM dual";
		Integer sn = jdbcTemplate.queryForObject(sql, Integer.class);
		return sn;
	}

}
